/*******************************************************************************
 *
 *      Filename: Singleton.h
 *   Description: 
 *        Author: [kb]ypp
 *    Created at: November 20, 2005
 * Last modified: 
 *
 ******************************************************************************/

#ifndef SINGLETON_H
#define SINGLETON_H

template< typename T >
class Singleton {
public:
	//! @brief Get the instance of the Singleton
	static T& instance()
	{
		static T inst;
		return inst;
	}
	
protected:
	//! @brief Default constructor
	Singleton() {}
	//! @brief Destructor is virtual
	virtual ~Singleton() {}
	
private:
	//! @brief Copy-construction disabled
	Singleton( const Singleton& );
	//! @brief Assignment disabled
	const Singleton& operator=( const Singleton& );
};

#endif // SINGLETON_H
